Field of the Invention
The present invention relates to data processing apparatus and method of processing a plurality of input data based on respective attribute information thereof. Particularly, the present invention relates to data processing apparatus and method which are suitable for dividing an image into a plurality of areas based on its attribute and processing the divided image for each area.
Description of the Related Art
Conventionally, an area dividing (segmentation) method is used as technique of dividing an image into a plurality of areas such that each of the areas has same attributes such as color, pattern, brightness and the like (e.g., Japanese Patent Application Laid-Open No. 2007-272681). Since an encoding process and an area recognizing process can be then performed for each of the areas divided by the area dividing method, a process amount can be wholly reduced as compared with a case where an image is processed for each pixel. In recent years, the number of cases where an image process is performed to a high-resolution image by an embedded device increases. On such a premise, it is supposed to be able to, by processing the image for each of the areas after the division, perform the complicated processes in real time for the high-resolution image even by the embedded device.
From this kind of circumstance, several methods for achieving a real-time area dividing process have been proposed. In these methods, there is a method called an SLIC (simple linear iterative clustering) method of dividing an image into areas by performing clustering of pixel data using five-dimensional information of a color space (R, G, B) and a coordinate space (X, Y).
In the SLIC method, representative data serving as the center of a cluster is first arranged grid-likely in an image. Each of the representative data has five-dimensional information of a color space (l, a, b) and the coordinate space (X, Y). Incidentally, although CIELAB (l, a, b) is used as the color space in the SLIC method, also RGB (R, G, B), YCC (Y, Cb, Cr) or the like can be used. The representative data is also called a seed or a cluster centroid. In the SLIC method which is based on a k-means method being one of the clustering, each pixel is clustered to the representative point arranged grid-likely. In any case, the SLIC method is different from the k-means method in the point that the coordinate space to be clustered to the representative point is limited to a predetermined range. Since the shapes of the areas generated or formed by the SLIC method are relatively the same, the number of the areas becomes stable. The divided areas are called superpixels.
Besides, technique of recognizing an object using the superpixels has been developed, and this technique is applied to shot-image scene decision or the like. In the process of recognizing the object using the superpixels, the feature amounts of the superpixels are extracted, and the object is recognized by analyzing the extracted feature amounts. Besides, the accumulated data of the feature amount extracted for each of the pixels forming the superpixel may be adopted as the feature amount of the superpixel.
Incidentally, in the process of extracting the feature amounts of the superpixels, an accumulating operation is performed. In case of performing the operation such as the accumulating operation in which the past operation result is referred, if the past operation result cannot be held internally, read-modify-write access to an external memory occurs. Here, the access to the external memory takes an access latency corresponding to time from data request to data arrival. Therefore, in case of frequently accessing the external memory, the access to the external memory is a bottleneck, so that a problem that performance of a feature amount operation does not increase occurs.
Accordingly, a cache is generally known as a method of reducing reading and writing time for a memory. Namely, when the cache is used, it is possible to reduce the number of times of accessing the memory by holding a partial data of the memory area in the cache and repetitively using the held data.
However, when an image in which objects are complicated is divided, also the area division result in which a plurality of area labels are complicated is obtained. For this reason, in regard to an image in which a plurality of area labels are frequently changed, a hit rate of the cache decreases, and thus performance deteriorates. Therefore, in case of improving the hit rate in a system using the cache, it is supposed to increase a cache data capacity or design a cache update algorithm.
For example, Japanese Patent Application Laid-Open No. 2007-272681 proposes to generate, by analyzing an instruction to be executed, profile information indicating a possibility that the data stored in each cache line is again referred, and then, when a cache miss occurs, determine the cache line to be replaced on the basis of the generated profile information, thereby suppressing future occurrence of the cache miss.
However, if the cache data capacity is increased so as not to decrease the cache hit rate even for the image containing the complicated objects, a problem that the circuit scale increases occurs. In addition, since complicated design is necessary for the complicated cache update algorithm, the hardware to be added increases in such a case.